package com.atguigu.java.ai.langchain4j.assistant;


import com.atguigu.java.ai.langchain4j.tools.CalculatorTools;
import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.V;
import dev.langchain4j.service.spring.AiService;

import static dev.langchain4j.service.spring.AiServiceWiringMode.EXPLICIT;

@AiService(
        wiringMode = EXPLICIT,
        chatModel = "openAiChatModel",
        chatMemoryProvider = "chatMemoryProvider",
        tools = "calculatorTools"
)
public interface SeparateChatAssistant {

//    @SystemMessage("你是我的好朋友，请用台湾话回答。今天是{{current_date}}")
    @SystemMessage(fromResource = "my_prompt_template.txt")
//    String chat(@MemoryId int memoryId, @UserMessage String userMessage);
    String chat2(@MemoryId int memoryId,
                @UserMessage String userMessage,
                @V("username") String userName);
}
